import request from '/@/utils/request';

/**
 * 角色操作接口
 */
export function usePosApi() {
	return {
		getPosList: (params?: object) => {
			return request<any, AjaxResult>({
				url: '/pos/List',
				method: 'get',
				params,
			});
		},
		posPageList: (data={}) => {
			return request<any, AjaxResult>({
				url: '/pos/PageList',
				method: 'post',
				data,
			});
		},
		addPos: (data={}) => {
			return request<any, AjaxResult>({
				url: '/pos/Add',
				method: 'post',
				data,
			});
		},
		editPos: (data={}) => {
			return request<any, AjaxResult>({
				url: '/pos/Update',
				method: 'post',
				data,
			});
		},
		deletePos: (data={}) => {
			return request<any, AjaxResult>({
				url: '/pos/Delete',
				method: 'post',
				data,
			});
		},
	};
}
